]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
7 years agopieTimer: Use custom GObject property for animating pie
Jonas Dreßler [Wed, 21 Aug 2019 14:47:38 +0000 (16:47 +0200)]
pieTimer: Use custom GObject property for animating pie

Before the move to Clutters implicit animations with 0846238f6 and
bf497ed64, we used Tweener to do a fake-animation of the opacity and
Tweeners `onUpdate` signal to queue a repaint of the PieTimer everytime
Tweener tries to update the animation.

Now, with Clutters implicit animations, there is no `onUpdate` signal
anymore and also `notify::opacity` no longer gets emitted since the
value doesn't actually change. This lead to the PieTimer no longer being
repainted, which broke the animation.

Fix this by implementing the current angle of the pie using a custom
GObject property `angle` and animating this property using the new
`actor.ease_property` method.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1533

7 years agoUpdate Persian translation
Danial Behzadi [Wed, 21 Aug 2019 11:31:51 +0000 (11:31 +0000)]
Update Persian translation

7 years agoUpdate Polish translation
Piotr Drąg [Tue, 20 Aug 2019 17:19:52 +0000 (19:19 +0200)]
Update Polish translation

Closes https://gitlab.gnome.org/Teams/Translation/pl/issues/4

7 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 20 Aug 2019 10:43:51 +0000 (12:43 +0200)]
Updated Spanish translation

7 years agoshell-global: Set stage input region via MetaX11Display
Jonas Ådahl [Fri, 16 Aug 2019 14:29:22 +0000 (16:29 +0200)]
shell-global: Set stage input region via MetaX11Display

The API in mutter changed to set it via MetaX11Display; lets jump on the
train.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/682

7 years agoshell-global: Only sync input region if X11 session
Jonas Ådahl [Fri, 16 Aug 2019 14:28:22 +0000 (16:28 +0200)]
shell-global: Only sync input region if X11 session

We'd do an early out in the called functions eventually anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/682

7 years agoUpdated Lithuanian translation
Aurimas Černius [Sun, 18 Aug 2019 19:05:31 +0000 (22:05 +0300)]
Updated Lithuanian translation

7 years agoUpdate Finnish translation
Jiri Grönroos [Sun, 18 Aug 2019 14:38:55 +0000 (14:38 +0000)]
Update Finnish translation

7 years agoUpdate Romanian translation
Florentina Mușat [Sun, 18 Aug 2019 12:26:25 +0000 (12:26 +0000)]
Update Romanian translation

7 years agoiconGrid: Only add one onComplete callback for the animations
Jonas Dreßler [Thu, 8 Aug 2019 22:18:38 +0000 (00:18 +0200)]
iconGrid: Only add one onComplete callback for the animations

We only need a callback on the last animated actor, so no need to
register the callback for all actors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/678

7 years agoiconGrid: Restore grid actors when cancelling animations
Jonas Dreßler [Thu, 8 Aug 2019 22:15:48 +0000 (00:15 +0200)]
iconGrid: Restore grid actors when cancelling animations

When cancelling the animations of the icon grid, right now we simply
destroy all the clones without resetting the opacity and making the
actor reactive again. So if the spring animation to show the grid is
cancelled by pressing a key to start a search, the icon clones would be
destroyed, but the icon-opacity would still be set to 0. Now if the
Escape key is pressed, viewSelector will show the last active page (ie.
the iconGrid) without a custom animation and only fade in the page, and
because the icons still have an opacity of 0, they will be invisible.

Fix this by always restoring the opacity and reactive property of the
original actors if the animation is cancelled instead of only destroying
the clones.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/678

7 years agoUpdate Indonesian translation
Kukuh Syafaat [Fri, 16 Aug 2019 08:38:32 +0000 (08:38 +0000)]
Update Indonesian translation

7 years agoUpdate Catalan translation
Jordi Mas [Thu, 15 Aug 2019 07:24:26 +0000 (09:24 +0200)]
Update Catalan translation

7 years agoUpdate Basque translation
Asier Sarasua Garmendia [Wed, 14 Aug 2019 14:31:21 +0000 (14:31 +0000)]
Update Basque translation

7 years agobrightness: Ignore slider changes we initiated ourselves
Florian Müllner [Mon, 12 Aug 2019 12:10:43 +0000 (14:10 +0200)]
brightness: Ignore slider changes we initiated ourselves

Since we set the proxy value when the slider changes and set the slider
value on proxy property changes, we run into a cycle.

Before commit 3d3dca4aa this was addressed by not notifying on all slider
changes, but only in reaction to direct user action. Given that since the
splitting out of the BarLevel class those events are handled in a subclass,
that approach is at least unconvential and fairly fragile.

Instead, make the brightness indicator ignore any changes to the slider it
initiated itself.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1500

7 years agoslider: Do not notify on parent's behalf
Florian Müllner [Mon, 12 Aug 2019 15:40:54 +0000 (17:40 +0200)]
slider: Do not notify on parent's behalf

Instead just use the regular property setter which since commit 3d3dca4aa
already emits the signal and queues a redraw.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1500

7 years agobarLevel: Remove duplicated assignment
Florian Müllner [Mon, 12 Aug 2019 12:01:57 +0000 (14:01 +0200)]
barLevel: Remove duplicated assignment

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1500

7 years agoUpdate Swedish translation
Anders Jonsson [Mon, 12 Aug 2019 19:40:31 +0000 (19:40 +0000)]
Update Swedish translation

7 years agoUpdate Icelandic translation
Sveinn í Felli [Mon, 12 Aug 2019 07:47:19 +0000 (07:47 +0000)]
Update Icelandic translation

(cherry picked from commit 40db7932307d1f3f585b1fcdaf8246fc39c3c3e4)

7 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sun, 11 Aug 2019 14:29:45 +0000 (14:29 +0000)]
Update Basque translation

7 years agoBump version to 3.33.90
Florian Müllner [Fri, 9 Aug 2019 21:47:13 +0000 (23:47 +0200)]
Bump version to 3.33.90

Update NEWS.

7 years agoAppIcon: Nullify _draggable if available on destruction
Marco Trevisan (Treviño) [Fri, 9 Aug 2019 21:30:44 +0000 (23:30 +0200)]
AppIcon: Nullify _draggable if available on destruction

When an AppIcon actor is destroyed we try to unset a non-existent draggable
property.

Fix the typo, doing this even if we're not currently in a drag operation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/677

7 years agoappDisplay: Disconnect Main item-drag signals on icons destruction
Marco Trevisan (Treviño) [Fri, 9 Aug 2019 21:27:57 +0000 (23:27 +0200)]
appDisplay: Disconnect Main item-drag signals on icons destruction

Icons connect to overview's item-drag events to react to start/end drags,
however the icons should disconnect from signals once destroyed.

So, disconnect from Main events once the actors have been destroyed.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1511

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/677

7 years agoviewSelector: Use onStopped callback when fading out pages
Jonas Dreßler [Thu, 8 Aug 2019 19:09:06 +0000 (21:09 +0200)]
viewSelector: Use onStopped callback when fading out pages

With 8b368d010 we fixed a bug where the onComplete callback was always
called no matter whether the transition was interrupted before or not.
This exposed another bug: viewSelector depends on this behaviour when
fading out pages: After fading out a page, we call `this._animateIn` to
show the new page. Now if the fade-out animation gets interrupted, with
the correct behaviour of onComplete we end up not showing a new page and
the viewSelector remains empty instead. One case where this happens is
when pressing a key to start a search during the overview-animation.

Obviously we also want to show the new page in case the fade-out
animation was interrupted, so use the onStopped callback instead of the
onComplete callback here.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/674

7 years agoenvironment: Don't use actor if an ease callback destroys it
Marco Trevisan (Treviño) [Fri, 9 Aug 2019 00:58:28 +0000 (02:58 +0200)]
environment: Don't use actor if an ease callback destroys it

An actor ease callback could destroy the actor, in such case we should do not
touch the actor anymore.

So, before calling the callback, reset restore the easing state and don't
perform any further action with it.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1507

7 years agosrc: Stop using g_get_current_time()
Florian Müllner [Wed, 31 Jul 2019 18:29:46 +0000 (20:29 +0200)]
src: Stop using g_get_current_time()

It isn't 2k38 safe and has therefore been deprecated. Replace it
with GDateTime or g_get_real_time() as appropriate.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/657

7 years agomain: Remove left-over variable
Florian Müllner [Wed, 31 Jul 2019 18:09:44 +0000 (20:09 +0200)]
main: Remove left-over variable

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/657

7 years agofolderIcon: Properly reject drop
Georges Basile Stavracas Neto [Fri, 9 Aug 2019 13:56:37 +0000 (10:56 -0300)]
folderIcon: Properly reject drop

When a drop is rejected, we are mistakenly returning
true instead of false.

Return false when the rejecting the drop.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/671

7 years agodnd: Fix drag cancel animation scale
Georges Basile Stavracas Neto [Thu, 8 Aug 2019 20:21:12 +0000 (17:21 -0300)]
dnd: Fix drag cancel animation scale

When a drag is cancelled and the source actor
is visible, the drag actor is animated back to
the source position. The scale that the drag
actor will become is calculated as:

    scale = this._dragActor.width / sourceScaledWidth

However, this is wrong; what we wanted to do
is the opposite:

    scale = sourceScaledWidth / this._dragActor.width

Fix the scale calculation to match the math
above.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/671

7 years agoappIcon: Create and delete folders with DnD
Georges Basile Stavracas Neto [Tue, 16 Jul 2019 20:51:25 +0000 (17:51 -0300)]
appIcon: Create and delete folders with DnD

Create a new folder when dropping an icon over another
icon. Try and find a good folder name by looking into
the categories of the applications.

Delete the folder when removing the last icon.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/671

7 years agoappIcon: Make AppIcon a drop target
Georges Basile Stavracas Neto [Fri, 12 Jul 2019 22:32:54 +0000 (19:32 -0300)]
appIcon: Make AppIcon a drop target

Because the Dash icons are not drop targets themselves,
add a tiny DashIcon class, which is an AppDisplay.AppIcon
subclass, and disable all DND drop code from it.

Show a folder preview when dragging an app icon over another
app icon.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/671

7 years agoappIcon: Scale and fade itself when starting drag
Georges Basile Stavracas Neto [Thu, 4 Jul 2019 21:39:13 +0000 (18:39 -0300)]
appIcon: Scale and fade itself when starting drag

As per design direction, scale and fade the app icon
when starting dragging it, and show it again if the
drop is accepted. Clutter takes care of animating the
rest of icon positions through implicit animations.

Scale and fade the dragged icon while it's being dragged.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/671

7 years agosearch: Defer updating results on allocation changes until redraw
Jonas Dreßler [Wed, 7 Aug 2019 15:39:25 +0000 (17:39 +0200)]
search: Defer updating results on allocation changes until redraw

Since the `notify::allocation` signal will obviously get emitted while
the actor is inside an allocation cycle and we might end up doing
changes to its allocation inside `updateSearch` by hiding or showing the
actor (which queues a relayout), we get a warning from Clutter.

Fix this by delaying the call to the parent method until the next
redraw, which should happen a few moments after the current relayout.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/672

7 years agosearch: Don't use max number of results if allocation width is 0
Jonas Dreßler [Wed, 7 Aug 2019 14:42:17 +0000 (16:42 +0200)]
search: Don't use max number of results if allocation width is 0

Since commit 1a27ff6130e03e64d9e426ece72a12e4e2a80f50 we use the
allocation width of the GridSearchResults actor to calculate the max
number of results that can be shown for this search provider.

On the first run of the search, when no previous (cached) allocation is
available for the actor of GridSearchResults, the allocation width used
in `_getMaxDisplayedResults` will be 0, which in turn will make
`updateSearch` filter out all results returned by the search provider.

Now if this search provider is the only search provider that's enabled,
after calling `updateSearch`, the `SearchResults` class will call
`_updateSearchProgress` to check if any results are visible, assume
nothing was found and therefore hide the scrollView. This in turn causes
the GridSearchResults actor to not get a new allocation, which prevents
our code to fixup the max number of results on `notify::allocation` from
working: The number will continue to be 0 and we'll never show any
results.

To fix this regression, return -1 in `_getMaxDisplayedResults` if the
allocation width is 0 to inform `updateSearch` that we can't calculate
the maximum number yet and interpret a return value of -1 as "show all
results" in `updateSearch`. The same problem would probably also appear
if the allocation width is anything between 0 and the width of the
iconGrid with one icon in it, although this might as well be a valid
width in case a very small screen is used or with very large icons. So
let's only check for a width of 0 and hope the GridSearchResults actor
won't get weird temporary allocations in that range.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/672

7 years agoappDisplay: Animate activate-discrete-gpu action in the AppIconMenu
Jonas Dreßler [Thu, 8 Aug 2019 16:15:32 +0000 (18:15 +0200)]
appDisplay: Animate activate-discrete-gpu action in the AppIconMenu

Just as we animate the apps launch using the zoom out animation if the
'new-window' action provided by the app is launched, we should also show
this animation if the 'activate-discrete-gpu' action provided by the app
via its AppInfo is launched.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/673

7 years agoappDisplay: Always animate our own new window and discrete gpu actions
Jonas Dreßler [Thu, 8 Aug 2019 15:27:40 +0000 (17:27 +0200)]
appDisplay: Always animate our own new window and discrete gpu actions

For the "New Window" entry we add to the AppIcons popup menu we should
always animate the app icon if the menu entry is activated as it was
intended by commit 62786c09a8.

For the "Launch using Dedicated Graphics Card" entry we can also always
show the animation if the entry is activated since the entry should only
be visible if the app is stopped.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/673

7 years agoutil: Remove AppSettingsMonitor
Florian Müllner [Thu, 1 Aug 2019 14:24:59 +0000 (16:24 +0200)]
util: Remove AppSettingsMonitor

It is now unused.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158

7 years agodateMenu: Stop accessing app settings directly
Florian Müllner [Wed, 31 Jul 2019 23:24:13 +0000 (01:24 +0200)]
dateMenu: Stop accessing app settings directly

Clocks has exactly the same issue as Weather: Its integration currently
relies on accessing its settings directly, which isn't possible when
the app is sandboxed.

Fix this the same way we did for Weather, by adding our own setting
and syncing it with the app via a custom D-Bus interface.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158

7 years agoappDisplay: Animate launch of new-window action in the AppIconMenu
Jonas Dreßler [Fri, 2 Aug 2019 12:23:13 +0000 (14:23 +0200)]
appDisplay: Animate launch of new-window action in the AppIconMenu

We add our own "New Window" menu entry if the app doesn't already
provide a 'new-window' action. For this menu entry, we show the zoom out
animation on the app icon when the user clicks the entry.

To be consistent in case the app already provides its own 'new-window'
action via its AppInfo, also show the zoom out animation when this
action is activated.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/662

7 years agoshell/app-system: Monitor for icon theme changes
Georges Basile Stavracas Neto [Thu, 1 Aug 2019 23:58:20 +0000 (20:58 -0300)]
shell/app-system: Monitor for icon theme changes

Whenever an app is installed, the usual routine is
to run 'gtk-update-icon-cache' after installing all
of the app's files.

The side effect of that is that the .desktop file of
the application is installed before the icon theme
is updated. By the time GAppInfoMonitor emits the
'changed' signal, the icon theme is not yet updated,
leading to StIcon use the fallback icon.

Under some circumstances (e.g. on very slow spinning
disks) the app icon is never actually loaded, and we
see the fallback icon forever.

Monitor the icon theme for changes when an app is
installed. Try as many as 6 times before giving up
on detecting an icon theme update.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/661

7 years agost/texture-cache: Monitor GtkIconTheme changes
Georges Basile Stavracas Neto [Thu, 1 Aug 2019 23:54:42 +0000 (20:54 -0300)]
st/texture-cache: Monitor GtkIconTheme changes

The texture cache, right now, only monitors for
complete theme changes. If the contents of the
icon theme change, however, the texture cache
isn't properly invalidated.

This manifests itself as a randomly reproducible
bug when installing an app; the app icon may be
the fallback forever, or as long as something else
updates the icon theme.

Watch for the GtkIconTheme:changed signal, and
evict the texture cache when the theme changes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/661

7 years agocontrolsManager: Don't fade icon grid while dragging
Georges Basile Stavracas Neto [Wed, 3 Jul 2019 17:53:09 +0000 (14:53 -0300)]
controlsManager: Don't fade icon grid while dragging

As pointed out by designers, fading it signals that the
icon grid is not a drop target, when now it actually is.

Remove the fade effect applied to the icon grid when
dragging. Since this is the only caller of fadeIn() and
fadeHalf(), also remove these methods.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664

7 years agoallView: Scale in when moving icons from folders
Georges Basile Stavracas Neto [Sat, 29 Jun 2019 17:09:32 +0000 (14:09 -0300)]
allView: Scale in when moving icons from folders

App icons inside folders are already animated when the folder is
opened, but moving an app icon from a folder doesn't, making the
transition abrupt.

Fortunately, it's easy to detect icons that were previously hidden
but are not anymore.

Add an animation to these icons when showing.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664

7 years agofolderIcon: Add visual drag-over feedback
Georges Basile Stavracas Neto [Tue, 2 Jul 2019 00:37:35 +0000 (21:37 -0300)]
folderIcon: Add visual drag-over feedback

WIP: This is not exactly what was discussed on IRC, but
it's looking alright as a first iteration. Design feedback
welcomed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664

7 years agoallView: Remove icon from folder when dropping outside
Georges Basile Stavracas Neto [Sat, 29 Jun 2019 04:26:08 +0000 (01:26 -0300)]
allView: Remove icon from folder when dropping outside

When dropping an app icon to outside the folder, remove the
app from that folder. GNOME Shell is already smart enough
to figure out the setting changes and update the icons.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664

7 years agoallView: Switch pages when dragging above or below the grid
Georges Basile Stavracas Neto [Fri, 28 Jun 2019 23:48:22 +0000 (20:48 -0300)]
allView: Switch pages when dragging above or below the grid

This is necessary for being able to drag application icons
to folders in different pages.

Add a drag motion handler to AllView and handle overshoots
when dragging. Only handle it when dragging from AllView.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664

7 years agofolderIcon: Update folder icon after dropping
Georges Basile Stavracas Neto [Fri, 28 Jun 2019 22:49:18 +0000 (19:49 -0300)]
folderIcon: Update folder icon after dropping

After dropping an application into the folder icon, the
list of applications is updated but the folder icon itself
is not.

Introduce BaseIcon.update() and call it from FolderIcon
when redisplaying.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664

7 years agofolderIcon: Allow dropping application icons
Georges Basile Stavracas Neto [Fri, 28 Jun 2019 22:47:32 +0000 (19:47 -0300)]
folderIcon: Allow dropping application icons

Connect to the overview signals related to Drag n' Drop, and
allow dropping application icons in it. Dropping an icon
appends the application id to the folder's GSettings key.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664

7 years agoappDisplay: Add event blocker inhibition API
Georges Basile Stavracas Neto [Fri, 28 Jun 2019 22:44:20 +0000 (19:44 -0300)]
appDisplay: Add event blocker inhibition API

The event blocker is an actor that is added in between the
icon grid and the app folder popup in order to guarantee
that clicking outside the app folder will collapse it.

However, the next patch will require allowing dragging events
to be passed to folder icons, and the event blocker gets in
our way here, preventing drag n' drop to work properly.

Add an API to inhibit the event blocker. This API will be
used by the app folders while an item is dragged.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664

7 years agosystemActions: Create SensorProxy unconditionally
Florian Müllner [Sat, 15 Jun 2019 14:31:53 +0000 (16:31 +0200)]
systemActions: Create SensorProxy unconditionally

When plugging in a device with sensors that are unsupported by
iio-sensor-proxy, the proxy may quit so fast that the name disappears
from the bus before we get to construct the SensorProxy in response
to the name-appeared handler, resulting in the following warning:

JS ERROR: TypeError: this._sensorProxy is null
_sensorProxyAppeared/this._sensorProxy<@resource:///org/gnome/shell/misc/systemActions.js:217:17
_makeProxyWrapper/</<@resource:///org/gnome/gjs/modules/overrides/Gio.js:243:21

Address this by creating the proxy unconditionally instead of monitoring
the bus name, and using the g-name-owner property to determine whether
iio-sensor-proxy is active.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1357

7 years agoworkspace: Sort windows to minimize travel distance
Sergey Bugaev [Sat, 20 Oct 2018 13:28:05 +0000 (16:28 +0300)]
workspace: Sort windows to minimize travel distance

When transitioning to or from the overview, windows travel
a certain distance between their real desktop position and
their place in the overview window grid. The less this travel
distance is, the smoother, more polished, and less jarring
the overall transition looks. This is why it makes sense to
try reordering and repositioning windows to minimize their
travel distance. That being said, there are other factors
that impact the quality of the overview layout, such as how
much the windows get scaled and what portion of the overall
available space they take up.

The existing code tries to minimize the travel distance by
sorting the windows in each row by their horizontal position.
There are, however, two problems with this implementation.
First, it compares the coordinates of windows' left edges as
opposed to their centers, which means it yields unexpected
results when a small window is positioned next to the left
edge of a large window. Second, it completely disregards
vertical coordinates, instead assigning windows to the grid
rows using their monotonically increasing window numbers,
effectively vertically sorting them by the order they were
created in.

This commit changes both vertical and horizontal ordering
to work based on the coordinates of the geometric centers
of the windows. That is to say, windows are first assigned
to grid rows based on the vertical coordinates of their
centers, and subsequently sorted inside each row based on
the horizontal coordinates of said centers. In my testing,
this leads to a much more intuitive and visually pleasing
window placement.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/267

7 years agoweather: Pick up original settings values
Florian Müllner [Thu, 1 Aug 2019 13:18:43 +0000 (13:18 +0000)]
weather: Pick up original settings values

We mirror Weather's location settings to not depend on the app running,
but then don't read the original values, oops.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158

7 years agoweather: Fix warning on closing Weather
Florian Müllner [Wed, 31 Jul 2019 23:24:13 +0000 (01:24 +0200)]
weather: Fix warning on closing Weather

GDBusProxy::g-properties-changed is also emitted when the name drops from
the bus, at which point any properties will be null. That's not a valid
gsettings value, so to avoid the corresponding warning, move the g-name-owner
check accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158

7 years agodocs: Update animation section
Florian Müllner [Sat, 21 Jul 2018 01:18:29 +0000 (03:18 +0200)]
docs: Update animation section

Replace the existing Tweener section with a small outline of the
Clutter animation API and our wrappers.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

7 years agolookingGlass: Remove Tweener from preimported modules
Florian Müllner [Fri, 20 Jul 2018 22:01:37 +0000 (00:01 +0200)]
lookingGlass: Remove Tweener from preimported modules

We want to encourage using Clutter's implicit animations directly,
so stop importing the discouraged animation framework by default.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

7 years agokeybindings: Remove pause-resume-tweens shortcut
Florian Müllner [Sat, 21 Jul 2018 03:49:20 +0000 (05:49 +0200)]
keybindings: Remove pause-resume-tweens shortcut

It is no longer useful since we replaced Tweener.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

7 years agodnd: Stop using getTweenCount()
Florian Müllner [Sat, 21 Jul 2018 22:46:05 +0000 (00:46 +0200)]
dnd: Stop using getTweenCount()

Those checks were carried over from the very first DND implementation;
if they were ever actually required at all, this is no longer the case
as we moved away from Tweener for all our animations.

The number of cases where an extension is still using Tweener, creates
draggable actors, *AND* requires the checks for proper functioning
should be indistinguishable from zero, so drop the code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

7 years agojs: Use Clutter transitions for adjustment changes
Florian Müllner [Wed, 24 Jul 2019 19:03:17 +0000 (21:03 +0200)]
js: Use Clutter transitions for adjustment changes

This concludes our quest of moving from Tweener to Clutter's
animation framework.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

7 years agoenvironment: Add convenience method for adjustment transitions
Florian Müllner [Thu, 25 Jul 2019 14:21:46 +0000 (16:21 +0200)]
environment: Add convenience method for adjustment transitions

By now, Tweener is used exclusively to animate changes to the
StAdjustment:value property. But not for long, as now that we
implement the same transition API as Clutter.Actor, we can
re-use the existing convenience method for property transitions
for adjustment changes as well.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

7 years agost: Use StAdjustment's new transition API
Florian Müllner [Fri, 2 Aug 2019 15:04:42 +0000 (17:04 +0200)]
st: Use StAdjustment's new transition API

Now that the adjustment itself can be used to track its transitions,
do that for animating the scroll bar handle.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

7 years agost: Add transition API to StAdjustment
Florian Müllner [Fri, 2 Aug 2019 14:58:39 +0000 (16:58 +0200)]
st: Add transition API to StAdjustment

StAdjustment implements the ClutterAnimatable interface, so we can
already animate its properties with ClutterPropertyTransitions.

But as it is currently not possible to associate a transition with
an adjustment, it must be owned (and kept alive in case of GC) by
the calling code.

Change that by implementing the same (add|remove|get)_transition() API
as ClutterActor, so we can use a familiar API and even duck typing in
case of javascript.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669

7 years agovolume: Fix overdrive in slider
Florian Müllner [Wed, 7 Aug 2019 12:55:49 +0000 (14:55 +0200)]
volume: Fix overdrive in slider

When setting a maximum value above 1, we currently set a non-existant
maximum_level property instead of the actual 'maximum-value' one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/670

7 years agobarLevel: Fix value range
Florian Müllner [Wed, 7 Aug 2019 12:33:08 +0000 (14:33 +0200)]
barLevel: Fix value range

The range is usually within [0, 1], but since we support overdrive
as well, the upper limit must be the maximum value we allow for
overdrive.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/670

7 years agoenvironment: Remove transition tracking
Florian Müllner [Wed, 7 Aug 2019 00:28:40 +0000 (02:28 +0200)]
environment: Remove transition tracking

The tracking was important in an earlier iteration, but as the helper
functions now remove overwritten transitions before setting up the
new ones, we can just as well connect to the ::stopped signal directly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/668

7 years agoenvironment: Fix transition callback
Florian Müllner [Wed, 7 Aug 2019 00:26:32 +0000 (02:26 +0200)]
environment: Fix transition callback

This is rather embarrassing - we currently confuse the transition with
the finished parameter, which means we always run the onComplete handler
no matter whether the transition was interrupted or actually completed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/668

7 years agoallView: Always update currentPage
Georges Basile Stavracas Neto [Tue, 6 Aug 2019 22:41:54 +0000 (19:41 -0300)]
allView: Always update currentPage

Commit 0f178c3b3dcfe added a shortcirtuit to avoid running
an animation on an invisible actor. However, it introduced
a bug where the current page is not properly updated. That
leads to the wrong set of icons being animated under some
circumstances.

Update the current page even if we bail out early.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/667

7 years agojs: Ease non-animatable actor properties
Florian Müllner [Thu, 25 Jul 2019 00:06:05 +0000 (02:06 +0200)]
js: Ease non-animatable actor properties

Properties that aren't marked as animatable don't support *implicit*
animations, but they can still be animated with explicit transitions.
Use the newly added convenience method to cut down further on Tweener
usage.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666

7 years agoenvironment: Add convenience method for property transitions
Florian Müllner [Sat, 10 Jun 2017 02:14:12 +0000 (04:14 +0200)]
environment: Add convenience method for property transitions

While we are now using implicit animations for all animatable properties,
there are still some cases where we animate other actor properties (for
example from a custom subclass) or associated objects like effects.

Those can still be animated using Clutter animations, as long as we use
the explicit API rather than implicit animations. Again this API is
cumbersome and tricky enough to warrant a convenience wrapper.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666

7 years agojs: Use GObject properties for animated properties
Florian Müllner [Thu, 25 Jul 2019 22:13:19 +0000 (22:13 +0000)]
js: Use GObject properties for animated properties

Clutter animations work on GObject properties on animatables. The
last commit took care of the latter by turning all animated objects
into actor subclasses, now it's time to make all properties used
in Tweens into GObject properties.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666

7 years agojs: Actorize animated objects
Florian Müllner [Thu, 25 Jul 2019 16:53:00 +0000 (18:53 +0200)]
js: Actorize animated objects

We have a couple of places where we don't tween the actor, but a
custom property on the delegate object. In order to move those
to Clutter animations, we will need an animatable, so turn those
objects into widget subclasses.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666

7 years agowindowManager: Change effect's brightness property
Florian Müllner [Sun, 22 Jul 2018 01:31:54 +0000 (03:31 +0200)]
windowManager: Change effect's brightness property

The set_brightness() method is the most convenient way of controlling
the effect's brightness, but Clutter animations only deal with properties,
so start using the (ClutterColor) brightness property instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666

7 years agowindowManager: Move animation into WindowDimmer
Florian Müllner [Sun, 22 Jul 2018 01:31:54 +0000 (03:31 +0200)]
windowManager: Move animation into WindowDimmer

Currently WindowDimmer exposes a JS property that is used to control the
underlying effect. This works fine with Tweener, but not with Clutter
animations which we want to use ultimately.

As a first step towards that, expose a setDimmed() method instead of
the property and handle the animation internally, so it can be adapted
more easily.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666

7 years agojs: Use implicit animations for animatable properties
Florian Müllner [Fri, 20 Jul 2018 19:46:19 +0000 (21:46 +0200)]
js: Use implicit animations for animatable properties

We now have everything in place to replace Tweener for all animatable
properties with implicit animations, which has the following benefits:

 - they run entirely in C, while Tweener requires context switches
   to JS each frame

 - they are more reliable, as Tweener only detects when an animation
   is overwritten with another Tween, while Clutter considers any
   property change

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agoenvironment: Add convenience method for implicit animations
Florian Müllner [Sat, 10 Jun 2017 00:52:12 +0000 (02:52 +0200)]
environment: Add convenience method for implicit animations

Setting up implicit animations is more verbose than using tweener, in
particular when setting up a callbacks to run on overwrite or completion.
In order to make its use more convenient, monkey-patch ClutterActor
with an ease() method that works similarly to Tweener.addTween().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agoenvironment: Support slow down factor when easing
Florian Müllner [Wed, 4 Jun 2014 22:13:14 +0000 (00:13 +0200)]
environment: Support slow down factor when easing

Being able to slow down animations is a helpful debugging tool; to not
lose it when starting to use Clutter's implicit animations, monkey-patch
the appropriate methods to support our global slow down factor.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agotweener: Use new adjustAnimationTime() helper
Florian Müllner [Thu, 25 Jul 2019 10:24:50 +0000 (12:24 +0200)]
tweener: Use new adjustAnimationTime() helper

Now that we have a new helper function for adjusting animation times,
make Tweener use it so that we keep the code in a single place.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agoenvironment: Add adjustAnimationTime() helper
Florian Müllner [Wed, 4 Jun 2014 22:13:14 +0000 (00:13 +0200)]
environment: Add adjustAnimationTime() helper

As we currently use Tweener for all animations, we have a single place
for hooking up the enable-animations and slow-down-factor settings.
However that will no longer hold true when we'll start to use Clutter's
built-in animation facilities, so add a small helper function that
applies the necessary adjustments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agomessageTray: Stop tweening custom opacity property
Florian Müllner [Fri, 20 Jul 2018 19:46:19 +0000 (21:46 +0200)]
messageTray: Stop tweening custom opacity property

Notifications use a transition that overshoots the target value, however
we can only really do that for the position and not the opacity where
some values would end up out of the valid range.

We currently address this by proxying the actual opacity property in a
javascript property, and clamp it to the valid range in an onUpdate()
callback.

This won't be an option if we want to use Clutter animations, so instead,
use separate tweens for opacity and position.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agopageIndicators: Defer IN animation until redraw
Florian Müllner [Sun, 4 Aug 2019 23:02:38 +0000 (01:02 +0200)]
pageIndicators: Defer IN animation until redraw

Unlike Tweener, which doesn't know or care about actor state, Clutter
will skip implicit animations on actors that aren't mapped. This makes
sense of course, but it will break the page indicator animation we
do on map: When we get notified about the container being mapped, the
individual indicators (which are the actors being animated) are still
unmapped.

Resolve this by deferring the animation to a LaterFunc.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agoscreenShield: Stop using custom transition
Florian Müllner [Fri, 26 Jul 2019 00:38:49 +0000 (02:38 +0200)]
screenShield: Stop using custom transition

For animating the arrows on the screenshield, we currently use a custom
transition function that tweens the opacity from 0 to maxOpacity in the
first half of the animation, and from maxOpacity back to 0 in the second
half.

This doesn't easily translate to Clutter's own animation framework, so
replace the custom transition with two consecutive tweens which do.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agodash: Directly tween actors
Florian Müllner [Sat, 21 Jul 2018 05:08:33 +0000 (07:08 +0200)]
dash: Directly tween actors

Dash items are currently animated via the custom "childScale" and
"childOpacity" properties. However since commit efb3025d8cdb, those
properties actually control the scale-x/scale-y and opacity properties
of the actor itself (not the child), so cut out the intermediate
custom properties in favor of the "real" ones.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agoripple: Split animation
Florian Müllner [Sat, 10 Jun 2017 03:55:10 +0000 (05:55 +0200)]
ripple: Split animation

Similar to the previous patch, splitting the existing tween into two
will allow us to use implicit animations.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agopopupMenu: Split submenu expansion and arrow rotation
Florian Müllner [Sat, 10 Jun 2017 02:32:22 +0000 (04:32 +0200)]
popupMenu: Split submenu expansion and arrow rotation

When expanding a submenu, we currently use a single tween to animate
both the submenu actor and the source arrow. We do this by tweening
a monkey-patched JS property on the main actor, which we then use
to update the arrow's GObject property on updates. As Clutter cannot
animate random JS properties, this trick will prevent us from using
implicit animations here.

The only reason I can think of for using a single tween is to keep
both animations in perfect lock step, but as expansion and rotation
are visually quite distinct, this shouldn't be required, so just
set up separate animations for each actor.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22

7 years agoshell-app: Consider desktop actions in can_open_new_window()
Florian Müllner [Tue, 6 Aug 2019 11:19:59 +0000 (13:19 +0200)]
shell-app: Consider desktop actions in can_open_new_window()

We currently only consider a remote "app.new-window" action when running,
but not a fixed "new-window" action in the .desktop file. The latter is
clearly useful as well, in particular as open_new_window() already does,
so add it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/665

7 years agomessageTray: Drop tween helper function
Florian Müllner [Fri, 20 Jul 2018 19:46:19 +0000 (21:46 +0200)]
messageTray: Drop tween helper function

It makes the code harder to follow and saves little in terms of code
duplication.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

7 years agowindowManager: Small cleanup
Florian Müllner [Sun, 22 Jul 2018 01:31:54 +0000 (03:31 +0200)]
windowManager: Small cleanup

We start with a dim factor of 0, so the syncEnabled() call in the
constructor will always disable the effect. Just create the effect
disabled and save the method call.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

7 years agobarLevel: Don't reset value on overview-start changes
Florian Müllner [Thu, 25 Jul 2019 15:59:01 +0000 (15:59 +0000)]
barLevel: Don't reset value on overview-start changes

While it makes sense to cap the current value to a new maximum value,
I can't think of a good reason why changing the overdrive-start should
reset the current value to that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

7 years agologinDialog: Use GObject bindings over onUpdate handler
Florian Müllner [Fri, 26 Jul 2019 01:13:59 +0000 (01:13 +0000)]
loginDialog: Use GObject bindings over onUpdate handler

Instead of iterating over all actors each frame and sync'ing their
opacities, we can set up bindings once before the animation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

7 years agopointerA11yTimeout: Use notify handler instead of onUpdate callback
Florian Müllner [Fri, 26 Jul 2019 00:28:40 +0000 (02:28 +0200)]
pointerA11yTimeout: Use notify handler instead of onUpdate callback

We either need to queue a repaint on opacity updates or we don't,
whether the opacity change happens in an animation or not shouldn't
matter.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

7 years agopointerA11yTimeout: Fix style nit
Florian Müllner [Fri, 26 Jul 2019 00:25:32 +0000 (02:25 +0200)]
pointerA11yTimeout: Fix style nit

There's a stray space after the opening parentheses. While at it,
reindent the object literal.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

7 years agoswitcherPopup: Avoid unnecessary animation
Florian Müllner [Sat, 21 Jul 2018 03:20:35 +0000 (05:20 +0200)]
switcherPopup: Avoid unnecessary animation

Ever since commit 28bb0c1fb2, the popup's actual visibility has been
controlled by its :opacity property, not :visible.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

7 years agoappDisplay: Skip animation when hidden
Florian Müllner [Fri, 26 Jul 2019 01:04:38 +0000 (01:04 +0000)]
appDisplay: Skip animation when hidden

The time computation isn't just unnecessary in that case, it's likely
wrong as well: If we don't have a valid allocation, we may well end
up with a negative value, NaN or Infinity.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

7 years agoUpdate Indonesian translation
Kukuh Syafaat [Tue, 6 Aug 2019 10:49:56 +0000 (10:49 +0000)]
Update Indonesian translation

7 years agoallView: Redisplay on folder changes
Georges Basile Stavracas Neto [Tue, 2 Jul 2019 16:33:07 +0000 (13:33 -0300)]
allView: Redisplay on folder changes

Now that redisplaying is a lightweight operation that only
adds and removes what changed, we can not be concerned about
redisplaying on folder changes.

Redisplaying will be necessary when custom order in the app
grid is implemented, in order to update not only which icons
are hidden, but also their position.

Call _redisplay() in AllView when folders change.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645

7 years agobaseAppView: Remove unused BaseAppView.addItem
Georges Basile Stavracas Neto [Tue, 2 Jul 2019 13:12:08 +0000 (10:12 -0300)]
baseAppView: Remove unused BaseAppView.addItem

Now that BaseAppView does not allow for subclasses to add
and remove items directly, the addItem() method can be
removed.

Remove BaseAppView.addItem().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645

7 years agoallView, folderView: Only add icons once
Georges Basile Stavracas Neto [Tue, 30 Jul 2019 15:15:51 +0000 (12:15 -0300)]
allView, folderView: Only add icons once

FolderView and AllView currently check if the item is
present in the BaseAppView._items map, in order to avoid
adding the same icon multiple times.

Now that BaseAppView._loadApps() has a different role --
it returns a list with all app icons, and BaseAppView
diffs with the current list of app icons -- checking the
BaseAppView._items map is wrong.

Make sure there are no duplicated items in the temporary
array returned by all _loadApps() implementations. Remove
the now unused BaseAppView.hasItem() method.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645

7 years agobaseAppView: Only add and remove when necessary
Georges Basile Stavracas Neto [Tue, 2 Jul 2019 02:13:07 +0000 (23:13 -0300)]
baseAppView: Only add and remove when necessary

BaseAppView currently removes all icons, and readds them, every
time the list of app icons needs to be redisplayed. In order to
allow animating app icon positions in the future, however, we
cannot destroy the actors of the app icons.

Previous commits paved the way for us to do differential loading,
i.e. add only the icons that were added, and remove only what was
removed.

Make the BaseAppView effectively implement differential loading.
The BaseAppView.removeAll() method is removed, since we do not
remove all icons anymore. BaseAppView._loadApps() now returns an
array with the new apps, instead of putting them directly at the
BaseAppView lists.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645

7 years agobaseAppView: Move _loadGrid() into _redisplay()
Georges Basile Stavracas Neto [Tue, 2 Jul 2019 02:01:59 +0000 (23:01 -0300)]
baseAppView: Move _loadGrid() into _redisplay()

Next commit will introduce differential loading of
app icons, and will reorganize this part of the
codebase.

When doing that, the ideal symmetry of the new code
would be:

 * Update BaseAppView._allItems array
 * Update BaseAppView._items map
 * Update BaseAppView._grid actor

Move the code in _loadGrid() into _redisplay() so that
we can check in-place which new icons need to be added.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645

7 years agobaseAppView: Call loadGrid() directly
Georges Basile Stavracas Neto [Sat, 29 Jun 2019 16:22:08 +0000 (13:22 -0300)]
baseAppView: Call loadGrid() directly

Now that the three views follow the exact same loading routine
(remove all + load apps + load grid), we don't need each view
call loadGrid() directly anymore.

This is an important step in order to animate adding and removing
icons, since now we can diff old and new app icons properly.

Move all calls to BaseAppView.loadGrid() to a single one after
BaseAppView._loadApps(). Also add the underscore prefix, since
this is now considered a protected function.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645

7 years agofrequentView: Use BaseAppView.addItem() and loadGrid()
Georges Basile Stavracas Neto [Sat, 29 Jun 2019 16:15:20 +0000 (13:15 -0300)]
frequentView: Use BaseAppView.addItem() and loadGrid()

FrequentView is another view that is slightly not unified with how
BaseAppView expects subclasses to load app icons. Instead of using
BaseAppView.addItem() and then calling BaseAppview.loadGrid(), it
adds the app icons directly to the icon grid.

Make FrequentView add icons using BaseAppview.addItem(), and load
the icons using BaseAppView.loadGrid().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/645